<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <title>预约总览</title>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
    <style type="text/css">
        .layui-table-cell {
            height: 100%;
            max-width: 100%;
        }
    </style>
</head>
<body>


<table id="subscribeTable" lay-filter="subscribeTable"></table>




<script type="text/javascript" src="layui/layui.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">


    layui.use(['table','form','layer'],function () {

        var table = layui.table;
        var form = layui.form;
        var layer = layui.layer;
        table.render({
            elem:'#subscribeTable'
            ,url:'house-subscribe/list'
            ,page:true
            ,limit:6
            ,limits:[6,8,10,12]
            ,cols:[[
                {field:'id',title:'编号',sort:true, width:80,align:'center'}
                ,{field:'name', title:'昵称',align:'center'}
                ,{field:'mobile',title:'手机号',align:'center'}
                ,{field:'num',title:'人数',align:'center'}
                ,{field:'date',title:'预约日期',sort:true,align:'center'}
                ,{field:'houseName',title:'房源名称',align:'center'}
                ,{field:'houseUrl',title:'房源图片',align:'center',templet:function (d) {
                        return "<img src='"+d.houseUrl+"' height='50px'/>";
                    }}
                ,{field:'zjName',title:'中介姓名',align:'center'}
                ,{field:'zjMobile',title:'联系方式',align:'center'}
                ,{field:'zjUrl',title:'中介照片',align:'center',templet:function (d) {
                        return "<img src='"+d.zjUrl+"' height='50px'/>";
                    }}
                ,{field:'type',title:'预约状态',align:'center',templet:function (d) {
                        if (d.type == 0) {
                            return "<button type='button' class='layui-btn layui-btn-normal'>等待看房</button></span>";
                        }else {
                            return "<button type='button' class='layui-btn'>看房完成</button></span>";
                        }
                    }}
            ]]
        });


    });
</script>


</body>
</html>